<!-- INCLUDE ../include/title.html -->
<body>

<div class="ch-container">
    <div class="row">
        


        <div id="content" class="col-lg-10 col-sm-10">


           

            <div class="row">
    <div class="box col-md-12">
        
            <div class="box-content">
                <form role="form" id="form" method="post" enctype="multipart/form-data" name="modifyclass" action="index.php?do=index/profile">
                    <input type="hidden" name="action" value="modify"/>
                    <input type="hidden" name="UserID" value="{UserID}"/>
                    <div class="form-group">
                        <label for="classname">新密码</label>
                        <input type="password"  required name="password1" placeholder="新密码" id="password1" class="form-control">
                    </div>
                    <div class="form-group">
                        <label for="classname">确认新密码</label>
                        <input type="password"  required name="password2" placeholder="请重新输入密码" id="password2" class="form-control">
                    </div>

                    <button class="btn btn-default" onclick="submits()" type="button">提交</button>
                </form>

            </div>
        </div>
    </div>
    <!--/span-->

</div><!--/.fluid-container-->


<!-- INCLUDE ../include/bottom.html -->


<script>
    function submits(){
        var password1 = $("#password1").val();
        var password2 = $("#password2").val();
        if (password2 !== password1 ||  password1.length<=0) {
            alert("密码为空并且密码输入不一致!")
            $("#password1").parent().addClass("has-error");
            $("#password2").parent().addClass("has-error");
        }else{
            $("#form").submit();
        }
        //$("#form").submit();
    }
    
</script>


</body>